package com.shop.dingdongshoppingapi.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
@Data
@TableName("t_searchinfo")
@NoArgsConstructor
public class SearchInfo {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private Integer uid;
    private String info;
    @JsonFormat(pattern = "yyyy/MM/dd HH:mm:ss")
    private Date ctime;

    public SearchInfo(Integer uid, String info) {
        this.uid = uid;
        this.info = info;
        this.ctime = new Date();
    }
}
